mod button;
mod data;
mod date;
mod digit;
mod form;
mod input;
mod radio;
mod select;
mod util;
mod value;

pub use data::Data;
pub use date::DatePicker;
pub use digit::Digit;
pub use form::Form;
pub use input::Input;
pub use radio::Radio;
pub use select::Select;
use util::update_map;

#[derive(Clone)]
pub struct SelectOption {
    value: String,
    label: String,
}

impl SelectOption {
    pub fn new<T, U>(val: T, label: U) -> Self
    where
        T: AsRef<str>,
        U: AsRef<str>,
    {
        Self {
            value: val.as_ref().to_string(),
            label: label.as_ref().to_string(),
        }
    }
}
